Developer Documentation

QuickTime 4 API Documentation

3D Graphics Programming with QuickDraw 3D 1.5.4

Previous | QD3D Book | Overview | Chapter Contents | Next |

Managing Texture Shaders

QuickDraw 3D provides routines that you can use to create and manage texture shaders.

Q3TextureShader_New

You can use the Q3TextureShader_New function to create a new texture shader.

TQ3ShaderObject Q3TextureShader_New (TQ3TextureObject texture);
texture
A texture object.

DESCRIPTION

The Q3TextureShader_New function returns, as its function result, a new texture shader that uses the texture specified by the texture parameter. If Q3TextureShader_New cannot create a new texture shader, it returns the value NULL .

Q3TextureShader_GetTexture

You can use the Q3TextureShader_GetTexture function to get the texture associated with a texture shader.

TQ3Status Q3TextureShader_GetTexture (
                     TQ3ShaderObject shader,
                     TQ3TextureObject *texture);
shader
A texture shader.
texture
On exit, the texture object currently associated with the specified texture shader.

DESCRIPTION

The Q3TextureShader_GetTexture function returns, in the texture parameter, the texture object currently associated with the texture shader specified by the shader parameter.

Q3TextureShader_SetTexture

You can use the Q3TextureShader_SetTexture function to set the texture associated with a texture shader.

TQ3Status Q3TextureShader_SetTexture (
                     TQ3ShaderObject shader,
                     TQ3TextureObject texture);
shader
A texture shader.
texture
The texture object to be associated with the specified texture shader.

DESCRIPTION

The Q3TextureShader_SetTexture function sets the texture object associated with the texture shader specified by the shader parameter to the texture specified by the texture parameter.


© 1997 Apple Computer, Inc.

Previous | QD3D Book | Overview | Chapter Contents | Next |